home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / cnet / ffish_sim10b.lha / FrFishSim1b next >
Text File  |  1993-02-21  |  26KB  |  891 lines

  1. /*
  2.                             
  3.                                Freshwater
  4.                          Fishing Simulator V1.0b
  5.                                By  Matrix
  6.                                    of
  7.                        >Genesis< BBS 804-887-3584
  8.                          19200 Baud - 250 Megs - Wares
  9.  
  10.                     FOR USE ON REGISTERED CNET BBS'S ONLY
  11.  
  12.                                                             */
  13.  
  14. /*Housekeeping **********************************************/
  15. options results
  16. signal on ioerr
  17. signal on syntax
  18. signal on error
  19.  
  20. /*Shortcuts *************************************************/
  21. Ss=Sendstring
  22. Tr=Transmit
  23. Sf=Sendfile
  24. path1="pfiles:fishing/files/"                 /* Data Path*/  
  25. path2="pfiles:fishing/users/"                 /* Data Path*/
  26. path3="pfiles:fishing/lakemaps/"              /* Data Path*/
  27. path4="pfiles:fishing/lakedata/"              /* Data Path*/
  28. minutes="60"                                  /*Max Minutes Per Session*/
  29. BBS="Dragons Weyr"                            /*Your BBS Name*/
  30. /*Main ******************************************************/
  31.  
  32. START:
  33. logentry "Played Freshwater Fishing Simulator"
  34. ss"cf"
  35. news = "c9--------------------------------------------------------cf"
  36. call HERALD
  37. getuser 1;handle=result
  38. news = "ca<<cb"||handle||"ca>>cb";call HERALD;news=""
  39. Sf path1||"fish.intro";ss "cf"
  40. ss "f1n1Loading Data..."
  41. getuser 12;date=result
  42. getuser 7;ans=result
  43. temp=length(ans);gamestart=left(ans,temp-1)
  44. call CHECKSTATS
  45. call HERALD
  46. call LOADTOURNY
  47. call LOADLARGEST
  48. call DATA;ss"Done!"
  49. call TIMECHECK
  50. tr "n2You Have "||minleft||" minutes for this session" 
  51. Ss "n2 Do You Want Instructions? [No] >"
  52. Getchar
  53. ans=upper(result)
  54. if ans="#" then signal DROP
  55. if ans="Y" then do;Ss " Yes";Sf path1||"fish.doc";ss "cf";end
  56. if ans~="Y" then do;Ss " No";end
  57. signal LAKESELECT
  58.  
  59. SAVEUSER:
  60. call open(users,path2||handle, "W")
  61.      call writeln(users,date)
  62.      call writeln(users,minleft)
  63.      call close (users)
  64. return
  65.  
  66. CHECKSTATS:
  67. gameend=gamestart-minutes
  68. if gameend <= 0 then gameend = 0
  69.    if exists(path2||handle) then do;
  70.       signal off error
  71.       call open(users,path2||handle, "R")
  72.       lastplay=readln(users)
  73.       timetogo=readln(users)
  74.       call close (users)
  75.       signal on error
  76.       if left(lastplay,3)=left(date,3) then do;
  77.          if timetogo <= 0 then do;
  78.          tr "f1n2You Have Played Too Long Today!n1     Press A Key >>g0"
  79.          exit;end
  80.       gameend=gamestart-timetogo
  81.       end
  82.     end
  83. return
  84.  
  85. TIMECHECK:
  86. getuser 7;ans=result
  87. temp=length(ans);ans=left(ans,temp-1)
  88. minleft=ans-gameend
  89. if minleft <= 0 then do;
  90.    tr "f1n3 The sun has set and it's time to head home!!!"
  91.    tr "n1 Thanks for playing Freshwater Fishing Simulator!"
  92.    signal QUIT;end
  93. return
  94.  
  95. LAKESELECT:
  96. call TIMECHECK
  97. Sf path1||"fish.lakes";ss "cf"
  98. Ss "Which lake are you interested in? >"
  99. receive;lake=result
  100.   if left(lake,1) = "#" then signal DROP
  101.   if lake = "" then signal LAKESELECT
  102.   if exists(path4||"lakeData"||lake) then do;
  103.     call DISPLAY;call HOT
  104.     ss "n2cfDo You Want To Fish This Lake? [No] >"
  105.     getchar
  106.     ans=upper(result)
  107.     if ans="#" then signal DROP
  108.     if ans="Y" then do;
  109.     news="caPacked Up And Going To: cb"||Display.1||"ca"
  110.     call HERALD;call LOADLAKE
  111.     x = random(1,2,time('s'))
  112.     wx=wx.x;cwx=x   
  113.     signal FISHING;end
  114.     signal LAKESELECT
  115.   end
  116.   if ~exists(path4||"lakeData"||lake) then do;
  117.   tr "That Lake File Does Not Exist";end
  118. signal LAKESELECT
  119.  
  120. FISHING:
  121. call TIMECHECK
  122. tr "f1n4                     Fishing Menun2"
  123. tr "         cb[caGcb]cao Fishing"
  124. tr "         cb[caCcb]cahange Lakes"
  125. tr "         cb[caScb]caee Largest Fish Caught"
  126. tr "         cb[caFcb]caisherman's Herald"
  127. tr "         cb[caWcb]caeekly Tournament Update"
  128. tr "         cb[caDcb]caisplay Lake Info"
  129. tr "         cb[caIcb]canstructions"
  130. tr "         cb[caQcb]cauit to BBScf"
  131. ss "n2 cbWhat Do You Want To Do? ["||minleft||"]>cf"
  132. getchar
  133. ans=upper(result)
  134. if ans="#" then signal DROP
  135. ss ans
  136.   if ans="G" then do;signal GOFISHMENU;end
  137.   if ans="S" then do;call DISLARGEST;ss"n1cfPress any Key >> g1";end
  138.   if ans="F" then do;
  139.      ss "f1";sf path1||"fish.news";ss "n1cfPress a Key>> g1f1";end
  140.   if ans="W" then call DISTOURNY
  141.   if ans="D" then do
  142.   call DISPLAY;ss "n2cfPress a Key>>g1q1";end
  143.   if ans="Q" then signal QUIT
  144.   if ans="I" then do;
  145.   ss "f1";sf path1||"fish.doc";end
  146.   if ans="C" then do; call LOSEIT;signal LAKESELECT;end
  147. signal FISHING
  148.  
  149. LOSEIT:
  150. call PRESORT
  151. call SAVETOURNY
  152. if record=1 then do;
  153. call SAVELARGE;end
  154. ref=0;record=0;lure="None";chance=50;points=0;Tfish=0
  155. do x = 1 to 15;wellfish.x="None";welllbs.x=0;welloz.x=0;wellpoints.x=0;end
  156. return
  157.  
  158. GOFISHMENU:
  159. call TIMECHECK
  160. bufferflush
  161. if ref=0 then call REFRESH
  162. tr "f0n5n5cf"
  163. tr "                                                                             "
  164. tr "                                                                             "
  165. tr "                                                                             "
  166. tr "      [C]ast                              c9Boat Movementcf                      "
  167. tr "      [D]isplay Lake Info                       c98cf                            "
  168. tr "      [P]ick Lure                            c94cf     c96cf                         "
  169. tr "      [L]ook In Livewell                        c92cf                            "
  170. tr "      [R]efesh screen                        [KeyPad]                        "
  171. tr "      [Q]uit to Main                                                         "
  172. tr "                                                                             "
  173. ss "7HcdCommand ["||minleft||"]>       h7cf"
  174.  
  175. GOFISH: 
  176. getchar
  177. ans=upper(result)
  178. if ans="#" then signal DROP
  179. if ans="C" then do
  180.    if depth=7 then do
  181.    tr "f1n2         NOTICE"
  182.    tr "n1 NO FISHING FROM THE DOCK!w3";call REFRESH;signal GOFISHMENU;end
  183.    call BOAT;signal CAST;end
  184. if ans="D" then do;
  185.    call DISPLAY;ss"Press a Key>>g1";call REFRESH;signal GOFISHMENU;end
  186. if ans="P" then do;call PICKLURE;signal GOFISHMENU;end
  187. if ans="L" then do;call LIVEWELL;signal GOFISHMENU;end
  188. if ans="Q" then do; ref=0;signal FISHING;end
  189. if ans="R" then do;call REFRESH;signal GOFISHMENU;end
  190. if ans="8" | ans="4" | ans="6" | ans="2" then call MOVE
  191. signal GOFISH 
  192.  
  193. PICKLURE:
  194. call TIMECHECK
  195. ss "f0n5n7"
  196. tr "                             Operating                         "
  197. tr "                              Depths:                          "
  198. tr "      1. Shallow Crankbait           4'-8'                     "
  199. tr "      2. Deep Crankbait              11'-17'                   "
  200. tr "      3. Slim Minnow                 2'-4'                     "
  201. tr "      4. Bottom Bait                 Varies                    "
  202. tr "      5. Surface Plug                0'                        "
  203. tr "      6. Spinner Bait                Varies                    " 
  204. ss "      Select A Lure ["||minleft||"]> "
  205.  getchar
  206.  ans=upper(result)
  207.  if ans="#" then signal DROP
  208.  if ans<1 | ans>6 then signal PICKLURE
  209.  lure=lure.ans;lure2=ans;ans=""
  210.  ss "1Hcf"lure
  211.  if lure2=1 then do;
  212.     min=4;max=8;end
  213.  if lure2=2 then do;
  214.     min=11;max=17;end
  215.  if lure2=3 then do;
  216.     min=2;max=4;end
  217.  if lure2=5 then do;
  218.     min=0;max=0;end
  219.  if lure2=4 | lure2=6 then do;
  220.     min=0;max=depth;end
  221. return
  222.  
  223. LIVEWELL:
  224. t=5
  225. tr "f1n1  cb          Looking In The Livewell.....n1"
  226. tr "         caFish Type            Weight        Points"      
  227.   do x = 1 to 15;t=t+1
  228. ss ""||t||";6Hcb"||x||".ca"||""||t||";10Hcb"wellfish.x
  229. ss "ca"||t||";31Hcb"||welllbs.x||""||t||";33Hlbs"
  230. ss "ca"||t||";37Hcb"||welloz.x||""||t||";39Hoz"
  231. ss "ca"||t||";45Hc9"||wellpoints.x
  232. end
  233. tr "n2 cfTotal Points    >c9"points||"cf     Total Fish   >c9"Tfish 
  234. ss "cfPress A Key>> g1"
  235. call REFRESH
  236. return
  237.  
  238. MOVE:
  239.    if ans="8" then do;
  240.    if posY-3<=0 then do;
  241.       ss"b1";return;end
  242.    posY=posY-1;call NEWDATA
  243.    if depth=0 then do;
  244.       posY=posY+1;call NEWDATA
  245.       ss "b1";return;end
  246.    end
  247. if ans="4" then do;
  248.    if posX-4<=0 then do;
  249.       ss"b1";return;end
  250.    posX=posX-1;call NEWDATA
  251.    if depth=0 then do;
  252.       posX=posX+1;call NEWDATA
  253.       ss "b1";return;end
  254.    end
  255. if ans="6" then do;
  256.    if posX+4>=47 then do;
  257.    ss"b1";return;end
  258.    posX=posX+1;call NEWDATA
  259.    if depth=0 then do;
  260.       posX=posX-1;call NEWDATA
  261.       ss "b1";return;end
  262.    end
  263. if ans="2" then do;
  264.    if posY+3>=20 then do;
  265.    ss"b1";return;end
  266.    posY=posY+1;call NEWDATA
  267.    if depth=0 then do;
  268.       posY=posY-1;call NEWDATA
  269.       ss "b1";return;end
  270.    end
  271.  if depth ~=0 then tr "4Hcf"||depth*5||"Ft  "
  272.     else tr "4H cf0 Ft   "
  273.  if depth = 7 then do; tr "5Hcf"||type.6;end
  274.     else tr "5Hcf"||type.type
  275. tr "cf";thatsall=0
  276. call OKOK
  277. marker=left(map.depth,3)||"c5+q1"
  278. ss "5H"||marker||"f0"
  279. call HOT
  280. call TIMECHECK
  281. return
  282.  
  283. NEWDATA:
  284. hop=posX*3;hop1=hop+1;hop2=hop+2
  285. parse var row.posY +hop type +1
  286. parse var row.posY +hop1 depth +1
  287. parse var row.posY +hop2 hot +1
  288. return
  289.  
  290.  
  291. CHANCE:
  292. chance=50
  293.  if hot=0 then chance=10
  294.  if cwx=2 & depth=1 then chance=25
  295.  if lure2=2 & cwx=1 then chance=25
  296.  if lure2=5 & cwx=2 then chance=25
  297.  if min > depth*5 then do;
  298.    chance=0;drag=1;return;end 
  299.  if lure2=1 then do;
  300.       if cwx=2 & depth >=4 then chance=25
  301.       if cwx=1 & depth =2 & reel="S" then chance=35
  302.       if cwx=2 & depth >=2 & reel="F" then chance=25
  303.       if reel="S" & max>depth*5 then do
  304.       chance=0;drag=1;return;end
  305.     return;end
  306.  if lure2=2 then do;
  307.       if cwx=1 & depth >=3 then chance=25
  308.       if reel="S" & max>depth*5 then do;
  309.       chance=0;drag=1;return;end
  310.       if reel="F" & depth =6 then chance=25
  311.     return;end
  312.  if lure2=3 then do;
  313.       if cwx=2 & depth >=2 then chance=25
  314.     return;end
  315. return
  316.  
  317.  
  318. LOADLARGEST:
  319. if exists(path1||"fish.biggest") then do;
  320.    call open(big,path1||"fish.biggest","R")
  321.    do x = 1 to 17
  322.    largest.x = readln(big)
  323.    parse var largest.x lbsL.x'+'ozL.x'+'BigL.x'+'BigN.x
  324.    end
  325.    call close(big)
  326.    return;end
  327. ss "Fish.Biggest File Is Missing - Sysop Has Been Notified - w3"
  328. news="Fish.Biggest File Is Missing!!!"
  329. call HERALD;signal QUIT
  330. return
  331.  
  332. SAVELARGE:
  333. signal off error
  334. call open(big,path1||"fish.biggest","W")
  335.   do x = 1 to 17
  336.   writeln(big,largest.x)
  337.   end
  338.   signal on error
  339. call close(big)
  340. return
  341.  
  342. DISLARGEST:
  343. t=4
  344. tr"f1                  cbLargest Fish Caughtn1"
  345. tr" caFish Type         cbWeight       caLake                  cbName"
  346. tr"c9-------------------------------------------------------------------------"
  347. do x = 1 to 17;t=t+1
  348.    parse var Lfish.x What'+'
  349.    ss ""||t||";1Hcb"||What
  350.    ss ""||t||";19Hc9"||lbsL.x||""||t||";21Hcalbs"
  351.    ss ""||t||";25Hc9"||ozL.x ||""||t||";27Hcaoz"
  352.    ss ""||t||";32Hcb"||bigL.x
  353.    ss ""||t||";54Hca"||bigN.x
  354.  end
  355. return
  356.  
  357. HERALD:
  358. signal off error
  359. if exists(path1||"fish.news") then do;
  360.    call open(herald,path1||"fish.news", "A")
  361.    writeln(herald,news)
  362.    call close herald
  363.    end
  364. if ~exists(path1||"fish.news") then do;
  365. call open(herald,path1||"fish.news", 'W')
  366. writeln(herald,news)
  367. call close herald;end
  368. signal on error   
  369. return
  370.  
  371. LOADLAKE:
  372. ss "f7n1Stocking the Lake..."
  373. call open(ldata,path4||"lakeData"||lake)
  374.      do x = 1 to 2
  375.      temp = readln(ldata)
  376.      end
  377.      posY=readln(ldata)
  378.      posX=readln(ldata)
  379.      do x = 1 to 19
  380.      row.x = readln(ldata)
  381.      end
  382. call close(ldata)
  383.    hop=posX*3;hop1=hop+1;hop2=hop+2
  384.    parse var row.posY +hop type +1
  385.    parse var row.posY +hop1 depth +1
  386.    parse var row.posY +hop2 hot +1
  387. ss"Done"
  388. return
  389.  
  390. OKOK:
  391. temp=(posX*3)-11;j=5;k=11;start=(posX*3)-11;y=posY-2
  392.  do s = 1 to 5
  393.    do p = 1 to 9
  394.      parse var row.y +start a +1
  395.      start=start+3
  396.      ss ""||j||";"||k||"H"||map.a
  397.      k=k+1;end
  398.  y=y+1;j=j+1;start=temp;k=11
  399.  end;ss"q1cf"
  400. return
  401.  
  402. LOADTOURNY:
  403. if exists(path1||"fish.tourny") then do;
  404.    call open(tourn,path1||"fish.tourny","R")
  405.    do x = 1 to 9
  406.          Tname.x = readln(tourn)
  407.          Tpoints.x = readln(tourn)
  408.       end
  409.    end
  410.    call close(tourn)
  411. /*x=1;g=0;limit=4;call SORT
  412. pwait=points;nwait=handle;x=4;limit=10;call SORT*/
  413. return
  414.  
  415. PRESORT:
  416. pwait=points;nwait=handle;x=1;g=0;limit=4;call SORT
  417. pwait=points;nwait=handle;x=4;limit=10;call SORT
  418. return
  419.  
  420. DISTOURNY:
  421. t=4
  422. tr "f1n2               cbALL TIME POINT LEADERScfn1"
  423. do x = 1 to 3
  424. t=t+1
  425. tr ""||t||";9Hcb"||x||". ca"||Tname.x||""||t||";35Hcb"||Tpoints.x||"ca"||t||";40HPoints"
  426. end
  427. tr "n2              cbBEST SESSIONS OF THE WEEKn1cf"
  428. t=11
  429. do x = 4 to 9
  430. f=f+1;t=t+1
  431. tr ""||t||";9Hcb"||f||". ca"||Tname.x||""||t||";35Hcb"||Tpoints.x||"ca"||t||";40HPoints"
  432. end
  433. f=0;t=0
  434. tr "n1         cbYour Score For This Session: > c9"||points||"q1"
  435. ss "n2 cfPress any Key>> g1f1q1"
  436. return
  437.  
  438. SAVETOURNY:
  439. if g=1 then do
  440. call open(tourn1,path1||"fish.tourny","W")
  441.      signal off error
  442.      do x = 1 to 9
  443.      writeln(tourn1,Tname.x)
  444.      writeln(tourn1,Tpoints.x)
  445.      end
  446.      signal on error
  447.      call close(tourn1)
  448.      end
  449. return
  450.  
  451. SORT:
  452. if x = limit then return
  453.    if points < Tpoints.x & handle = Tname.x & x <4 then return
  454.    if points >= Tpoints.x & handle = Tname.x then do;
  455.    Tpoints.x = points;Tname.x = handle;g=1;return;end
  456.    if pwait > Tpoints.x & nwait ~= Tname.x then do;
  457.    ptemp = Tpoints.x;ntemp = Tname.x;Tpoints.x = pwait;Tname.x = nwait;g=1
  458.    Call SORTMORE;x=x+1;signal SORT;end
  459. x=x+1;signal SORT
  460. return
  461.  
  462. SORTMORE:
  463. if x + 1 < limit then do;
  464.    x=x+1
  465.    pwait = Tpoints.x;nwait = Tname.x 
  466.    Tpoints.x = ptemp;Tname.x = ntemp
  467.    x=x-1
  468. end
  469. return
  470.  
  471. DISPLAY:
  472. ss "f1"
  473. if exists(path3||"lakeMap"||lake) then do;
  474.    sf path3||"lakeMap"||lake
  475.    call open(Lname,path4||"lakeData"||lake,"R")
  476.    display.1 = readln(Lname)
  477.    fishlife=readln(Lname)
  478.    markerY=readln(Lname)
  479.    markerX=readln(Lname)
  480.    /*tr ""||markerY||";"||markerX||"Hz1c3+q1"     Problem Child */
  481.    end;call close(Lname)
  482.    thatsall=0
  483.    parse var fishlife code.2'+'code.3'+'code.4'+'code.5'+'code.6
  484.    code2=code.2;code3=code.3;code4=code.4;code5=code.5;code6=code.6
  485.    tr "f05HcaLake: cf"||display.1
  486.    tr "5H"||map.0||"q1 - cbLand"
  487.    tr "5H"||map.1||"q1 - cb0  cf-cb 10ft"
  488.    tr "5H"||map.3||"q1 - cb10 cf-cb 20ft"
  489.    tr "5H"||map.5||"q1 - cb20 cf-cb 30ft"
  490.    tr "5H"||map.7||"q1 - cbDockn1q1"
  491.    tr "45Hc3+q1 - cbBoatn1q1"
  492.    tr "45HcaFishlife:"
  493.    parse var Lfish.code2 what'+'
  494.    tr "45Hcb"what"q1"
  495.    parse var Lfish.code3 what'+'
  496.    tr "45Hcb"what"q1"
  497.    parse var Lfish.code4 what'+'
  498.    tr "45Hcb"what"q1"
  499.    parse var Lfish.code5 what'+'
  500.    tr "45Hcb"what"q1"
  501.    parse var Lfish.code6 what'+'
  502.    tr "45Hcb"what"q1"
  503.    return;end
  504. tr "Map File Does Not Exist - Sysop Informed!"
  505. tr "You will not be able to use the Display Functionw2"
  506. return
  507.  
  508. REFRESH:
  509. ref=1
  510. tr "q1f1n1cf"
  511. tr "           Mini Map      Depth"
  512. tr "          ____N____      Finder"
  513. tr "         |         |    ________ "
  514. tr "         |         |   |        |"
  515. tr "        W|         |E  |        |"
  516. tr "         |         |   |        |"
  517. tr "         |_________|   |________|"  
  518. tr "              S" 
  519. tr "5HLake: "||display.1
  520. tr "5HDay : "||wx
  521. tr "5HLure: cf"||lure
  522. if depth ~= 0 then tr "4H"||depth*5||"Ft";
  523.    else; tr "4H 0 Ft"
  524. if depth=7 then tr "6Hcf"||type.6
  525.    else tr "6Hcf"||type.1
  526. tr "cf"
  527. call OKOK
  528. marker=left(map.depth,3)||"c5+q1"
  529. tr "5H"||marker
  530. return      
  531.  
  532. BOAT:
  533. if Lure = "None" then call picklure
  534. ss "q1f0n5n6"
  535. tr "cer1 ______________                                                             "
  536. tr "cfr1 _____________ |cer1                                                            "
  537. tr "cfr1 |     | |    ||cer1                                                            "
  538. tr "cfr1 |     | |    ||cer1                                                            "
  539. tr "cfr1 |     | |    ||cer1                                                            "
  540. tr "cfr1 |     | |    ||cer1                                                            "  
  541. tr "cfr1 |_____|_|____||cer1                                                            "
  542. tr "cfr1 ______________|cer1                                                            "
  543. tr "cer1                                                                            q1"
  544. return
  545.  
  546. HOT:
  547.   if hot=1 then fishes=random(3,6,time('s'))
  548.   if hot=0 then fishes=1
  549. return
  550.  
  551. STRIKE:
  552. if chance >0 & drag ~=1 then do;
  553.       p=random(1,100,time('s'))
  554.       if chance > p then do;
  555.       strike=1;now=random(5,55,time('s'))
  556.       end;end
  557. return
  558.  
  559. CHANCE1:
  560. if lure2=1 | lure2=2 | lure2=3 then do;
  561.       if max+3>=depth*5 & reel="S" then do;
  562.       p=random(1,100,time('s'))
  563.       if p<=25 then drag=1;end;end
  564. if lure2=4 | lure2=6 then do;
  565.       if Ldepth+3>=depth*5 then do;
  566.       p=random(1,100,time('s'))
  567.       if p<=25 then drag=1;end;end
  568. if lure2=4 | lure2=6 then do;
  569.       if cwx=2 & Ldepth<=5 then chance =25
  570.       if depth=2 then do;
  571.          if cwx=1 & Ldepth > (depth*5)-4 then chance=25;end
  572.       if depth=3 | depth=4 then do;
  573.          if cwx=1 & Ldepth > (depth*5)-8 then chance=25;end
  574.       if depth=5 | depth=6 then do;
  575.          if cwx=1 & Ldepth > (depth*5)-15 then chance=25;end
  576.         end
  577. return
  578.  
  579. DRAG:
  580. if drag=1 then do;
  581.    if lure2=1 | lure2=2 then perc=70
  582.    if lure2=3 then perc=30
  583.    if lure2=6 then perc=5
  584.    Ldepth=max
  585.    if lure2=5 | lure2=4 then do;
  586.       call SPECIAL;return;end
  587.    if type=3 | type=4 | type=5 | type=7 type=8 then do;
  588.       p=random(1,100,time('s'))
  589.       if p <= perc then do; 
  590.            p=random(1,100,time('s'))
  591.            if p <20 then do;
  592.               snagnow=random(1,55,time('s'));snag=1;signal CAST1;end
  593.               if type=3 | type=7 then snagit="A Bunch of Weeds"
  594.               if type=5 then snagit="Some Lily Pads"
  595.               if type=4 | type=8 then snagit="A Piece of Wood"
  596.               call SPECIAL
  597.            end
  598.       end
  599.  end
  600. call STRIKE
  601. return
  602.  
  603. SPECIAL:
  604. if lure2=5 then return
  605. tire=0
  606. p=random(1,100,time('s'))
  607.   if p > 75 then do;
  608.      p=random(1,13,time('s'))
  609.      if p=1 then snagit="Jimmy Hoffa's Body!"
  610.      if p=2 then snagit="A Campbell Soup Can"
  611.      if p=3 then snagit="A Fishing Rod"
  612.      if p=4 then snagit="A Rusty Lure"
  613.      if p=5 then snagit="A Old Fishing Net"
  614.      if p=6 then snagit="A Women's Shoe"
  615.      if p=7 then snagit="A Bundle of Fishline"
  616.      if p=8 then snagit="A Commodore 64"
  617.      if p=9 then snagit="An Unknown Bone"
  618.      if p >=10 then do;
  619.       code9=17;snagit=0
  620.       parse var Lfish.17 cfish'+'cfishwt'+'cfishwm
  621.         p=random(1,100,time('s'))
  622.         if p<=20 then do;
  623.         news="Trophy Alert!!!";call HERALD
  624.         cfishwtl=random(cfishwt,cfishwm,time('s'))
  625.         cfishwto=random(1,15,time('s'))
  626.         hook=1;tire=1
  627.         return;end
  628.         cfishwtl=random(1,cfishwt,time('s'))
  629.         cfishwto=random(1,15,time('s'))
  630.         hook=1;tire=1
  631.         return;end
  632.   end
  633. return
  634.  
  635. CAST:
  636. call TIMECHECK
  637. tr "1Hq1cb[Q]uit    Retrieve = [S]low or [F]ast ?"
  638. Ldepth=0;now=0;strike=0;snagit=0;s=0;snag=0;snagnow=0;drag=0
  639. getchar
  640. reel=upper(result)
  641. if reel="Q" then do;signal GOFISHMENU;end   
  642. if reel="#" then signal DROP
  643. if lure2=4 | lure2=6 then do;
  644.    if reel="F" | reel="S" then do;
  645.       min=0;Ldepth=0;signal VARIE;end;end
  646. if reel="F" then do;
  647.    speed=20;call CHANCE;call CHANCE1;call DRAG
  648.    signal CAST1;end
  649. if reel="S" then do;
  650.    speed=40;call CHANCE;call CHANCE1;call DRAG
  651.    signal CAST1;end
  652. signal CAST
  653.  
  654. LOSTLURE:
  655. bufferflush
  656. tr "25H Snag!!! You Lose Your Lure!w2"
  657. lure="None";call refresh;signal GOFISHMENU
  658.  
  659. CAST1:
  660. call TIMECHECK
  661. ss"17Hcer1------------------------------------------------------------"
  662. ss "q1cb1H[A]bort       [H]ook        [R]etreiveq1"
  663. x=61
  664. if reel="F" then do
  665.    Ldepth=min
  666.    speed=25
  667.    if min>depth*5 then Ldepth=depth*5
  668.    end
  669. if reel="S" then do
  670.    Ldepth=max
  671.    speed=50
  672.    if max>depth*5 then Ldepth=depth*5
  673.    end
  674. tr"55H"||Ldepth||"57HFt"
  675. signal IOROUTINE
  676.  
  677. VARIE:
  678. if reel="F" then speed=20
  679. if reel="S" then speed=40
  680. ss"17Hcer1------------------------------------------------------------"
  681. ss "q1cb1H[A]bort       [H]ook        [R]etreiveq1"
  682. x=61
  683. do p = 1 to 200
  684.    nop;end
  685. min=min+1;Ldepth=min
  686. tr"55H"||LDepth||"57HFt"
  687. if Ldepth = depth*5 then do;
  688.    drag=1;call CHANCE;call CHANCE1;
  689.    call DRAG;signal IOROUTINE;end
  690. CHECKIO;if result=1 then do;
  691. getchar;key=upper(result)
  692.    if key="R" then do;
  693.    call CHANCE;call CHANCE1;call DRAG
  694.    x=61;signal IOROUTINE;end
  695.   if key="#" then signal DROP
  696.  end
  697. signal VARIE
  698.  
  699. IOROUTINE:
  700. CHECKIO;If result=1 then call key
  701. do i=1 to speed
  702.  nop
  703. end
  704. signal IOROUTINE
  705.  
  706. KEY:
  707. getchar
  708. key=upper(result)
  709. if key="R" then do;
  710.         x=x-1
  711.         if x=0 then do
  712.            x=61
  713.            if snagit ~=0 then do
  714.             bufferflush;tr "25H You Pulled Up "||snagit||"w2";end
  715.            if hook=1 then do;
  716.             hook=0;signal CALCULATE;end
  717.            ss"q1";bufferflush;ss"f0";call BOAT;signal CAST;end
  718.    if hook=1 & cfishwtl>15 & tire~=1 then do;
  719.          p=random(1,100,time('s'))
  720.          if p<20 then call PULLING;end
  721.    if x=snagnow & snag=1 then signal LOSTLURE
  722.    if x=now & strike=1 then do;call HOOK;x=x+1;strike=0;signal IOROUTINE;end
  723.    i=x+16;ss""||i||"Hcer1 "
  724.  end
  725. if key="A" then do;
  726.       call BOAT;signal CAST;end
  727. if key="#" then signal DROP
  728. return
  729.  
  730. CALCULATE:
  731. p=0
  732. cpoints=((cfishwtl/cfishwm)*100)%1
  733. points=points+cpoints
  734. Tfish=Tfish+1;thatsall=thatsall+1
  735. if thatsall=fishes then do;
  736.    hot="0"
  737.    row.posY = overlay('0',row.posY,posX*3+3,1)
  738.    end   
  739. parse var Lfish.code9 what '+'
  740. tr "25Hcer1"||what||"q1"
  741. tr "25Hcer1"||cfishwtl||"lbs"
  742. tr "32Hcer1"||cfishwto||"ozw1q1"
  743. code20=cfish;code30=cfishwtl;code40=cfishwto;code50=cpoints
  744. do p=1 to 15
  745.   if cpoints > wellpoints.p then do;
  746.     temp1=wellfish.p;temp2=welllbs.p;temp3=welloz.p;temp4=wellpoints.p
  747.     wellfish.p=cfish;welllbs.p=cfishwtl;welloz.p=cfishwto
  748.     wellpoints.p=cpoints
  749.     cfish=temp1;cfishwtl=temp2;cfishwto=temp3;cpoints=temp4
  750.   end
  751. end
  752. if code30 > lbsL.code9 then do;
  753.    lbsL.code9=code30
  754.    ozL.code9=code40
  755.    BigL.code9=display.1
  756.    BigN.code9=handle
  757.    largest.code9=code30||"+"||code40||"+"||display.1||"+"||handle
  758.    record=1
  759.    news="Caught A Record Breaker!!!";call HERALD
  760.    end
  761. if code30 = lbsL.code9 then do;
  762.    if code40 > ozL.code9 then do;
  763.    lbsL.code9=code30
  764.    ozL.code9=code40
  765.    BigL.code9=display.1
  766.    BigN.code9=handle
  767.    largest.code9=code30||"+"||code40||"+"||display.1||"+"||handle
  768.    record=1
  769.    news="Caught A Record Breaker!!!";call HERALD;end
  770. end
  771. call BOAT
  772. signal CAST
  773.  
  774. PULLING:
  775. r=x
  776. bufferflush
  777. tr"25HWhirrrrr!    "
  778. do p = 1 to 5
  779. r=r+1;w=r+16;ss""||w||"H-"
  780. end
  781. x=x+5
  782. if x>59 then do;
  783.    tr "15HLost 'em!!!  "
  784.    hook=0;signal CAST;end
  785. CHECKIO;if result=1 then do;getchar;ans=upper(result)
  786. if ans="#" then signal DROP 
  787. if ans="R" then do;
  788.    p=random(1,100,time('s'))
  789.      if p<15 then do;
  790.      strike=0;hook=0
  791.      tr"25HLost 'em!!!  "
  792.      x=x+2
  793.      signal IOROUTINE;end
  794.    end
  795. end
  796. return
  797.  
  798. HOOKEDEM:
  799. hook=1
  800. p=random(2,6,time('s'))
  801.      code9=code.p
  802.      parse var Lfish.code9 cfish'+'cfishwt'+'cfishwm
  803.      p=random(1,100,time('s'))
  804.      if p <= 15 then do;
  805.         news="Trophy Alert!!!";call HERALD
  806.         cfishwtl=random(cfishwt,cfishwm,time('s'))
  807.         cfishwto=random(1,15,time('s'))
  808.         return;end
  809.      cfishwtl=random(1,cfishwt,time('s'))
  810.      cfishwto=random(1,15,time('s'))
  811. return;end
  812.    
  813. HOOK:
  814. bufferflush
  815. tr "25HStrike!        "
  816. do p =1 to 75
  817.  CHECKIO;if result=1 then do;
  818.  getchar
  819.  ans=result
  820.   if ans="#" then signal DROP
  821.   if ans="H" then do;
  822.      tr"25HHooked 'em!    "
  823.      call HOOKEDEM;return;end;end
  824.  end
  825. ss"25HMissed 'em!"
  826. return
  827.  
  828. DATA:
  829. Lfish.1="Largemouth Bass+9+22";Lfish.2="Smallmouth Bass+5+11"
  830. Lfish.3="Striped Bass+20+59";Lfish.4="Lake Trout+20+65"
  831. Lfish.5="Brown Trout+15+33";Lfish.6="Rainbow Trout+8+19"
  832. Lfish.7="King Salmon+15+31";Lfish.8="Coho Salmon+15+31"
  833. Lfish.9="Channel Catfish+25+58";Lfish.10="Muskellunge+28+69"
  834. Lfish.11="Walleye+11+25";Lfish.12="Northern Pike+17+46"
  835. Lfish.13="White Bass+3+5";Lfish.14="Bluegill+2+4";Lfish.15="Crappie+3+6"
  836. Lfish.16="Yellow Perch+2+4";Lfish.17="Goodyear Tire+20+60"
  837. lure.1="Shallow Crankbait";lure.2="Deep Crankbait   "
  838. lure.3="Slim Minnow      ";lure.4="Bottom Bait      ";Tfish=0
  839. lure.5="Surface Plug     ";lure.6="Spinner Bait     ";map.1="z2 "
  840. lastplay="";timetogo=0;ref=0;lure="None";chance=50
  841. type.1="5H Rocky  5H Bottom 25HOpen Water"
  842. type.2="5H Sandy  5H Bottom 25HOpen Water"
  843. type.3="5H Weeds  5H        25H  Weeds   "
  844. type.4="5H  Logs  5H        25HOpen Water"
  845. type.5="5HLily Pad5H Stems  25HLily Pads "
  846. type.6="5H *Dock* 5H        25H  *Dock*  "
  847. type.7="5H Weeds  5H        25HOpen Water"
  848. type.8="5H Sunken 5H Vessel 25HOpen Water"
  849. map.2="z7 ";map.3="z6 ";map.5="z4 ";map.0="z2 "
  850. map.1="z7 ";map.4="z6 ";map.6="z4 ";map.7="z1 "
  851. points=0;f=0;wx.1="Cloudy       ";wx.2="Sunny        "
  852. do x = 1 to 15;wellfish.x="None";welllbs.x=0;welloz.x=0;wellpoints.x=0;end
  853. return
  854.  
  855. QUIT:
  856. news = "<<Leaving>>n1c9--------------------------------------------------------"
  857. call HERALD
  858. call SAVEUSER
  859. if points ~= 0 then do;
  860. call PRESORT
  861. call SAVETOURNY
  862. if record=1 then do;
  863.   call SAVELARGE;end
  864. end
  865. tr "n3 Returning to "||BBS
  866. exit
  867.  
  868. DROP:
  869. news = "<<Dropped Carrier>>n1c9---------------------------------------------------------"
  870. call HERALD
  871. call SAVEUSER
  872. /*Butthead dropped carrier - Not Saving ANYTHING He Caught!!!*/
  873. exit
  874.  
  875. ERROR:
  876. logentry "Freshwater Fish Sim ERROR Line: "||SIGL
  877. Tr "Program Error - Error in Line" SIGL
  878. tr "Sysop Informed"
  879. exit
  880.  
  881. IOERR:
  882. logentry "Freshwater Fish Sim IOERR Line: "||SIGL
  883. Tr "IO Error - Error in Line" SIGL
  884. tr "Sysop Informed"
  885. exit
  886.  
  887. SYNTAX: 
  888. logentry "Freshwater Fish Sim ERROR Line: "||SIGL||" Code: "||RC
  889. Tr "Syntax Error - Error in Line" SIGL'  error code: ' RC
  890. tr "Sysop Informed"
  891. exit